package com.itheima.backstage.controller;

import com.itheima.backstage.manager.UserInfoManager;
import com.itheima.vo.PageBeanVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
public class UserInfoController {
    @Autowired
    private UserInfoManager userInfoManager;
    //查询所有用户信息
    @GetMapping("/findUserInfoList")
    private PageBeanVo findUserInfoList(
            @RequestParam(defaultValue = "1") Integer pageNum,
            @RequestParam(defaultValue = "10") Integer pageSize) {
        return userInfoManager.findUserInfoList(pageNum, pageSize);
    }
    //根据id删除用户
    @GetMapping("/deleteById")
    public void deleteById( String id){
        userInfoManager.deleteById(id);

    }
}
